<template>
  <div>
    <div class="recommend-title">热销推荐</div>
    <ul>
      <li class="item border-bottom" v-for="item of recommendList">
        <img class="item-img" :src="item.imgUrl" alt="ssss" />
        <div class="item-info">
          <p class="item-title">{{ item.title }}</p>
          <p class="item-desc">{{ item.desc }}</p>
          <button class="item-butten">查看详情</button>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "HomeRecommend",
  props: {
    recommendList: Array,
  },
};
</script>

<style lang="stylus" scoped>
@import '~styles/mixins.styl';

.recommend-title {
  margin-top: 0.2rem;
  line-height: 0.8rem;
  font-size: 0.35rem;
  padding-left: 0.2rem;
  background-color: #cccccc;
}

.item {
  overflow: hidden;
  display: flex;
  height: 1.9rem;
}

.item-img {
  margin: 0.1rem;
  width: 1.9rem;
  height: 1.7rem;
}

.item-info {
  flex: 1;
  padding: 0.1rem;
  min-width: 0;
}

.item-title {
  ellipsis();
  line-height: 0.54rem;
  font-size: 0.32rem;
  color: #212121;
}

.item-desc {
  ellipsis();
  height: 0.6rem;
  line-height: 0.3rem;
  color: #616161;
  // background-color: green;
}

.item-butten {
  margin-top: 0.1rem;
  background: #ff9300;
  padding: 0 0.1rem;
  border-radius: 0.06rem;
  color: #fff;
}
</style>
